package com.xhx.model.utils;

import java.io.Serializable;


public class PageResult implements Serializable {

    // region [ 成员变量 ]

    /**
     * 记录总数
     */
    private Integer count = 0;

    /**
     * 当前页
     */
    private Integer page = 0;


    /**
     * 每页记录数
     */
    private Integer size = 0;

    /**
     * 业务数据
     */
    private Object list = null;

    /**
     * 副导航
     */
    private Object subnav = null;

    // endregion

    // region [ 构造函数 ]

    /**
     * <strong>构造函数：无参</strong>
     */
    public PageResult() {

    }

    /**
     * <strong>构造函数：列表</strong>
     *
     * @param count 符合条件的总记录数
     * @param page  当前页码
     * @param size  每页记录数
     * @param list  当前页数据集合
     */
    public PageResult(Integer count, Integer page, Integer size, Object list) {
        this.count = count;
        this.page = page;
        this.size = size;
        this.list = list;
    }

    /**
     * <strong>构造函数：列表</strong>
     *
     * @param count 符合条件的总记录数
     * @param page  当前页码
     * @param size  每页记录数
     * @param list  当前页数据集合
     * @param subnav  副导航
     */
    public PageResult(Integer count, Integer page, Integer size, Object list, Object subnav) {
        this.count = count;
        this.page = page;
        this.size = size;
        this.list = list;
        this.subnav = subnav;
    }

    // endregion

    // region [ getter/setter ]

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public Object getList() {
        return list;
    }

    public void setList(Object list) {
        this.list = list;
    }

    public Object getSubnav() {
        return subnav;
    }

    public void setSubnav(Object subnav) {
        this.subnav = subnav;
    }

    // endregion
}